#define _CRT_SECURE_NO_WARNINGS  1
#pragma warning(disable:6031)


#include "test.h"


int phoneDesktop()
{
	int n;
	cin >> n;

	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;

		int count = y / 2;
		int remain = (CELLSIZE - APPSIZE2*2) * count;
		if (y % 2 != 0)
		{
			++count;
			remain += CELLSIZE - APPSIZE2;
		}
			
		if (remain < x)
		{
			x -= remain;
			count += x / CELLSIZE;

			if (x % 15 != 0)
				++count;
		}

		cout << count << endl;
	}


	return 0;
}